﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SLTimeSystem
{
    public abstract class TimerAgentBase
    {
        public float TargetTime;
        public int RepeatCount;
        public Action OnTrigger;
        public float CurTime;
        public int CurRepeatCount;
        public bool IsTimeOver;

        public void SetEnable(bool isEnable)
        {
            IsTimeOver = !isEnable;
        }

        public abstract void CheckTime();

        public void SetTime(float time)
        {
            TargetTime = time;
        }

        public void Reset()
        {
            CurTime = 0;
            CurRepeatCount = 0;
        }
    }
}
